compress_buf: fix musl segfaults#612
Conversation
By default, musl has a stack size of 128K, while the compress_buf method uses 256KB of stack space! The easiest course of action is to add `static thread_local` to htab and hnext.
|
Is it valid for musl's stack size to be so small? |
yes |
By default, musl has a stack size of 128K, while the compress_buf method uses 256KB of stack space, causing a segfault when the repopagestore_compress_page method is called. Pull request: openSUSE/libsolv#612 Signed-off-by: Adam Duskett <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
By default, musl has a stack size of 128K, while the compress_buf method uses 256KB of stack space, causing a segfault when the repopagestore_compress_page method is called. Pull request: openSUSE/libsolv#612 Signed-off-by: Adam Duskett <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
|
Can we put some |
thread_local was introduced in C11 https://en.cppreference.com/w/c/thread/thread_local.html I added the threads.h include for backwards compatibility purposes for older compilers. Can you point me to an instance where it isn't available? |
|
I need to support older distributions as well. E.g. SUSE's SLE-12 distribution doesn't use C11 for compiling. |
|
Current versions of libsolv are going into SLE 12? In that case, you could use one of the alternate compilers in SLE 12, couldn't you? |
By default, musl has a stack size of 128K, while the compress_buf method uses 256KB of stack space!
The easiest course of action is to add
static thread_localto htab and hnext.